package cn.com.api.mapper.base;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_bonus_detail;

//DAO
public interface U_bonus_detailMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_BONUS_DETAIL  WHERE ID = #{id}")
	public ApiU_bonus_detail findU_bonus_detailById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_bonus_detail")
	public List<ApiU_bonus_detail> findU_bonus_details();

	// 添加
	@Insert("INSERT INTO U_BONUS_DETAIL (BONUS_ID, MONEY, IS_MAX, GET_TIME, GET_UID, GET_UNAME, GET_UHEAD, STATUS, EXT1, EXT2, EXT3, EXT4, EXT5, IS_FORWARD, FORWARD_WORD) VALUES (#{bonus_id}, #{money}, #{is_max}, #{get_time}, #{get_uid}, #{get_uname}, #{get_uhead}, #{status}, #{ext1}, #{ext2}, #{ext3}, #{ext4}, #{ext5}, #{is_forward}, #{forward_word})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_bonus_detail(ApiU_bonus_detail u_bonus_detail);

	// 修改
	@Update("UPDATE U_BONUS_DETAIL SET BONUS_ID = #{bonus_id}, MONEY = #{money}, IS_MAX = #{is_max}, GET_TIME = #{get_time}, GET_UID = #{get_uid}, GET_UNAME = #{get_uname}, GET_UHEAD = #{get_uhead}, STATUS = #{status}, EXT1 = #{ext1}, EXT2 = #{ext2}, EXT3 = #{ext3}, EXT4 = #{ext4}, EXT5 = #{ext5}, IS_FORWARD = #{is_forward}, FORWARD_WORD = #{forward_word} WHERE ID = #{id}")
	public int updateU_bonus_detail(ApiU_bonus_detail u_bonus_detail);

	// 删除
	@Delete("DELETE FROM U_BONUS_DETAIL  WHERE ID = #{id}")
	public int deleteU_bonus_detail(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
